package com.xyht.sca_s.student_manage_system.modules.repairCheck.controller;


import com.xyht.sca_s.student_manage_system.common.commonReturn.ResponseResult;
import com.xyht.sca_s.student_manage_system.common.desEncodeAndDecode.annotation.SecretBody;
import com.xyht.sca_s.student_manage_system.modules.repairCheck.entity.vo.SmsRepairCheckApplyNoteVO;
import com.xyht.sca_s.student_manage_system.modules.repairCheck.service.SmsRepairCheckApplyNoteService;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author XYHT
 * @since 2023-06-25
 */
@SecretBody
@RestController
@RequestMapping("/smsRepairCheckApplyNote")
public class SmsRepairCheckApplyNoteController {
    @Autowired
    SmsRepairCheckApplyNoteService smsRepairCheckApplyNoteService;
    @ApiModelProperty("添加注意事项")
    @PostMapping("/add")
    public ResponseResult addNote(@RequestBody SmsRepairCheckApplyNoteVO note){
        return smsRepairCheckApplyNoteService.addNote(note);
    }

    @ApiModelProperty("修改注意事项")
    @PostMapping("/update")
    public ResponseResult updateNote(@RequestBody SmsRepairCheckApplyNoteVO note){
        return smsRepairCheckApplyNoteService.updateNote(note);
    }


    @ApiModelProperty("查询注意事项（最新一条）")
    @GetMapping("/select")
    public ResponseResult select(){
        return smsRepairCheckApplyNoteService.select();
    }
}

